#pragma once
/***********************************************************************************************
COPYRIGHT 2011 Mafahir Fairoze

This file is part of Neural++.
(Project Website : http://mafahir.wordpress.com/projects/neuralplusplus)

Neural++ is a free software. You can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

Neural++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License <http://www.gnu.org/licenses/> for more details.

***********************************************************************************************/

#include "../Helper.h"
#include "KohonenLayer.h"

namespace NeuralPlusPlus
	{
	namespace Core
		{
		namespace SOM
			{
			class KohonenLayer;
			/// <summary>
			/// Position Neuron is a neuron in a two-dimensional space used in Kohonen networks.
			/// </summary>
			class PositionNeuron : public INeuron
				{
				public: Point Coordinate;
				public: double NeighborhoodValue;

						/// <summary>
						/// Creates new positon neuron
						/// </summary>
				public: PositionNeuron(Point coordinate, KohonenLayer *parent);

						/// <summary>
						/// Runs the neuron. (Propagates the source synapses and update input and output values)
						/// </summary>
				public: void Run();

						/// <summary>
						/// Trains weights of associated source synapses.
						/// </summary>
				public: void Learn(double learningRate);
				};
			}
		}
	}